/*
 * @Author: T.Y.Z
 * @Date: 2022-12-09 10:15:36
 * @LastEditTime: 2022-12-09 14:57:16
 * @LastEditors: DESKTOP-4QFD9PO
 * @Description: 
 */

import { reactive,defineComponent,ref,h} from 'vue'
import ButtonRenderer from './TableCellRenderer/ButtonRenderer'
import {  AgGridVue } from 'ag-grid-vue3'

const VVtable = defineComponent({
    components:{
        AgGridVue
    },
    name:'Mytable',
    props:{
        datalist:{
            type: Array,
            requried:true
          
        },
        columns:{
            type: Array,
            requried:true
        }
    },
    setup(){
     
          const defaultColDef = {
            sortable: true,
            resizable:true,
            filter: true,
            flex: 1
          }
         
            
        
          return {
            defaultColDef
          }
    },
    render(){
        return (
            <>
                <AgGridVue  style="height:100%" defaultColDef={this.defaultColDef} className={'ag-theme-alpine'} rowData={this.datalist} columnDefs={this.columns}></AgGridVue>
            </>
        )
    }
})

export default VVtable